package com.yq.cp.service.basics.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yq.cp.entity.basics.EquipmentManagement;
import com.yq.cp.entity.common.PageVo;
import com.yq.cp.mapper.basics.EquipmentManagementMapper;
import com.yq.cp.service.basics.EquipmentManagementService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * 设备管理 服务实现类
 * </p>
 *
 * @author shenyuqing
 * @since 2024-08-27
 */
@Service
public class EquipmentManagementServiceImpl extends ServiceImpl<EquipmentManagementMapper, EquipmentManagement> implements EquipmentManagementService {
    @Resource
    EquipmentManagementMapper equipmentManagementMapper;

    @Override
    public IPage<EquipmentManagement> examineList(PageVo vo) {
        Page<EquipmentManagement> page = new Page<>(vo.getPage(), vo.getSize());
        page = equipmentManagementMapper.examineList(page,vo);
        return page;
    }

    @Override
    public IPage<EquipmentManagement> removeExamineList(PageVo vo) {
        Page<EquipmentManagement> page = new Page<>(vo.getPage(), vo.getSize());
        page = equipmentManagementMapper.removeExamineList(page,vo);
        return page;
    }

    @Override
    public void bohui(Long id) {
        equipmentManagementMapper.bohui(id);
    }

    @Override
    public IPage<EquipmentManagement> deleteToRemove(PageVo vo) {
        IPage<EquipmentManagement> page = new Page<>(vo.getPage(), vo.getSize());
        page = equipmentManagementMapper.deleteToRemove(page,vo);
        return page;
    }
}
